const Router=require('koa-router');
const router=new Router();
const authorfoot=require('./authorfoot');
const users=require('./users');
const user=require('./user');
const game= require('./game');
const games= require('./games');
const poem= require('./poem');
const author= require('./author');
const classify = require('./classify')
const type=require('./type')
const recommend = require('./recommend');
const login = require('./login');
//前端
router.use('/authorfoot', authorfoot.routes(), authorfoot.allowedMethods());//地图页
router.use('/game', game.routes(), game.allowedMethods());//游戏页
router.use('/classify', classify.routes(), classify.allowedMethods());//主题页
router.use('/recommend', recommend.routes(), recommend.allowedMethods());//推荐页
router.redirect('/','/recommend')
router.use('/users',users.routes(),users.allowedMethods());//用户页
//后台
router.use('/login', login.routes(), login.allowedMethods());
router.use('/author', author.routes(), author.allowedMethods());//诗人页
router.use('/games', games.routes(), games.allowedMethods());//游戏页
router.use('/poem', poem.routes(), poem.allowedMethods());//古诗页
router.use('/type', type.routes(), type.allowedMethods());//主题页
router.use('/user',user.routes(),user.allowedMethods());//用户页
module.exports=router;